#include <iostream>
#include <unistd.h>
#include <stdlib.h>

using namespace std;
int main()
{
  int cnt = 3;
  while(cnt--)
  {
    cout << "我是C++，我的pid:" << getpid() << endl;    
    if(!getenv("MYENV")) cout << "NULL" << endl;
    else cout << "MYENV:" << getenv("MYENV") << endl;
    
    if(!getenv("PATH")) cout << "NULL" << endl;
    else cout << "PATH:" << getenv("PATH") << endl;
    
    cout << getenv("USER") << endl;
    sleep(1);
  }
  return 0;
}

